<include file="Public/min-header" />
<style>
    .col100{width:100px;text-align:center;float:left;display:inline;border-right:1px solid #0080FF;}
    .col150{width:150px;text-align:center;float:left;display:inline;border-right:1px solid #0080FF;}
    .col300{width:300px;text-align:center;float:left;display:inline;border-right:1px solid #0080FF;}
    .coltop{border-top:1px solid #0080FF;}
    .colno{border-right:none;}
    .wrapper{min-height:1000px!important;}
</style>
<div class="wrapper">
    <include file="Public/breadcrumb" />
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <nav class="navbar navbar-default">
                            <div class="collapse navbar-collapse">
                                <form class="navbar-form form-inline" action="{:U('Amuse/comment')}" method="post">
                                    <div class="form-group">
                                        <input type="text" name="keywords" class="form-control" placeholder="订单号">
                                    </div>
                                    <div class="form-group">
                                        <select class="form-control">
                                            <option>请选择支付状态</option>
                                        </select>
                                    </div>
                                    <div class="form-group">
                                        <select class="form-control">
                                            <option>请选择配送状态</option>
                                        </select>
                                    </div>
                                    <button type="submit" class="btn btn-primary">提交</button>
                                </form>
                            </div>
                        </nav>
                    </div>
                    <div class="box-body">
                        <div class="row">
                            <div class="col-sm-12">
                                <table id="list-table" class="table table-bordered table-striped dataTable">
                                    <thead>
                                    <tr role="row">
                                        <th>ID</th>
                                        <th width="180">订单号</th>
                                        <th>收货人</th>
                                        <th>联系方式</th>
                                        <th>收货地址</th>
                                        <th>支付方式</th>
                                        <th>订单金额</th>
                                        <th>订单状态</th>
                                        <th>下单时间</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <foreach name="order_list" item="vo" key="k">
                                        <tr role="row" align="center">
                                            <td style="line-height:34px;">{$vo.id}</td>
                                            <td class="order_sn" align="left" style="position:relative;">
                                                <div style="line-height:34px;">{$vo['order_sn']}</div>
                                                <div class="goods_list" style="position: absolute;left:160px;width:1052px;background:#fff;border:1px solid #0080FF;border-radius:5px;top:0;display:none;">
                                                    <div style="line-height:40px;height:40px;">
                                                        <div class="col300">商品名称</div>
                                                        <div class="col150">商家名称</div>
                                                        <div class="col150">商品图片</div>
                                                        <div class="col150">商品规格</div>
                                                        <div class="col100">商品金额</div>
                                                        <div class="col100">商品数量</div>
                                                        <div class="col100 colno">小计</div>
                                                    </div>
                                                    <volist name="vo['goods_list']" id="val">
                                                        <div style="line-height:80px;height:80px;">
                                                            <div class="col300 coltop">{$val.goods_name}</div>
                                                            <div class="col150 coltop">{$val.store_name}</div>
                                                            <div class="col150 coltop">
                                                                <img height="60" src="{$val.thumb}">
                                                            </div>
                                                            <div class="col150 coltop">{$val.spec_name}</div>
                                                            <div class="col100 coltop">{$val.goods_price}</div>
                                                            <div class="col100 coltop">{$val.goods_number}</div>
                                                            <div class="col100 colno coltop">{$val['goods_price']*$val['goods_number']}</div>
                                                        </div>
                                                    </volist>
                                                </div>
                                            </td>
                                            <td align="left" style="line-height:34px;">{$vo.consignee}</td>
                                            <td align="left" style="line-height:34px;">{$vo.mobile}</td>
                                            <td align="left" style="line-height:34px;">{$vo.address}</td>
                                            <td align="left" style="line-height:34px;">{$vo.pay_type}</td>
                                            <td align="left" style="line-height:34px;">{$vo.order_price}</td>
                                            <td align="left" style="line-height:34px;">
                                                <if condition="$vo['status'] eq 1">
                                                    <span style="color:red;">待支付</span>
                                                <elseif condition="$vo['status'] eq 4" />
                                                    <span style="color:red;">已取消</span>
                                                <elseif condition="$vo['status'] eq 2 && $vo['order_status'] lt 1" />
                                                    <span style="color:orange;">待发货</span>
                                                <elseif condition="$vo['status'] eq 2 && $vo['order_status'] eq 1" />
                                                    <span style="color:orange;">待收货</span>
                                                <elseif condition="$vo['status'] eq 2 && $vo['order_status'] eq 2 && $vo['is_comment'] lt 1" />
                                                    <span style="color:green;">待评价</span>
                                                <elseif condition="$vo['status'] eq 2 && $vo['order_status'] eq 2 && $vo['is_comment'] eq 1" />
                                                    <span style="color:green;">已完成</span>
                                                </if>
                                            </td>
                                            <td align="left" style="line-height:34px;">{$vo.add_time|date="Y-m-d H:i:s",###}</td>
                                            <td style="line-height:34px;">
                                                <a class="btn btn-info" href="{:U('Admin/Order/detail',array('id'=>$vo['id']))}"><i class="fa fa-eye"></i></a>
                                                <a class="btn btn-danger" onClick="delfun(this,{$vo['id']})"><i class="fa fa-trash-o"></i></a>
                                            </td>
                                        </tr>
                                    </foreach>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6 text-left"></div>
                            <div class="col-sm-6 text-right">{$page}</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
</body>
<script>
    $('.order_sn').mouseenter(function(){
        $(this).find('.goods_list').show();
    }).mouseleave(function(){
        $(this).find('.goods_list').hide();
    });
</script>
</html>
